package com.amit;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class MyListener2 implements ServletContextAttributeListener {
		
public MyListener2()
	{
		System.out.println("MyListener2...");
	}
	
	@Override
	public void attributeAdded(ServletContextAttributeEvent scae) {
		
		System.out.println("attribute added...");
		System.out.println(scae.getName()+"\t" +scae.getValue());;
		
	}

@Override
public void attributeRemoved(ServletContextAttributeEvent scae) {
	
	System.out.println("attribute removed...");

	System.out.println(scae.getName()+"\t"+scae.getValue());
	
}

@Override
public void attributeReplaced(ServletContextAttributeEvent scae) {
	
	System.out.println("attribute replaced...");
	System.out.println(scae.getName()+"\t"+scae.getValue());
		
}
}
